gdk_cairo_draw_from_gl - fix drawing with alpha on window scale > 1
authorAlexander Larsson <alexl@redhat.com>
Mon, 15 Dec 2014 20:54:11 +0000 (21:54 +0100)
committerAlexander Larsson <alexl@redhat.com>
Mon, 15 Dec 2014 20:57:02 +0000 (21:57 +0100)
The scissoring needs to take into account the window scale.

gdk/gdkgl.c

index af47d8c45dc28d645fae2a178b9dfd0e5505c919..2c554bfa45ad63bb341ebc78cd0ee0208939b60e 100644 (file)
@@ -527,8 +527,8 @@ gdk_cairo_draw_from_gl (cairo_t              *cr,
 
       cairo_region_get_extents (clip_region, &clip_rect);
 
-      glScissor (clip_rect.x, FLIP_Y (clip_rect.y + clip_rect.height),
-                 clip_rect.width, clip_rect.height);
+      glScissor (clip_rect.x * window_scale, FLIP_Y ((clip_rect.y + clip_rect.height) * window_scale),
+                 clip_rect.width * window_scale, clip_rect.height * window_scale);
 
       n_quads = 0;
       n_rects = cairo_region_num_rectangles (clip_region);